Part Number Hot Search : 
64C64 IRFI9610 45104C 2SC1515 EZ20D5 U6428 STV5728 SSM2275S
Product Description
Full Text Search
 

To Download USAB13AP77016-XXX-B05 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  user?s manual target devices pd77110 pd77111 pd77112 pd77113 pd77114 pd77115 sap77016-b05 mpeg-4 celp speech codec middleware document no. u14497ej2v0um00 (2nd edition) date published december 2000 n cp(k) printed in japan
user?s manual u14497ej2v0um 2 [memo]
user?s manual u14497ej2v0um 3 patent for mpeg-4 celp a number of patents exist for systems related to mpeg-4 celp. nec would request that customers ensure they comply with the relevant rights for these patents. nec does not accept any responsibility for infringement of any patent rights by the customer. ms-dos and windows are either registered trademarks or trademarks of microsoft corporation in the united states and/or other countries. m8e 00. 4 the information in this document is current as of october, 2000. the information is subject to change without notice. for actual design-in, refer to the latest publications of nec's data sheets or data books, etc., for the most up-to-date specifications of nec semiconductor products. not all products and/or types are available in every country. please check with an nec sales representative for availability and additional information. no part of this document may be copied or reproduced in any form or by any means without prior written consent of nec. nec assumes no responsibility for any errors that may appear in this document. nec does not assume any liability for infringement of patents, copyrights or other intellectual property rights of third parties by or arising from the use of nec semiconductor products listed in this document or any other liability arising from the use of such products. no license, express, implied or otherwise, is granted under any patents, copyrights or other intellectual property rights of nec or others. descriptions of circuits, software and other related information in this document are provided for illustrative purposes in semiconductor product operation and application examples. the incorporation of these circuits, software and information in the design of customer's equipment shall be done under the full responsibility of customer. nec assumes no responsibility for any losses incurred by customers or third parties arising from the use of these circuits, software and information. while nec endeavours to enhance the quality, reliability and safety of nec semiconductor products, customers agree and acknowledge that the possibility of defects thereof cannot be eliminated entirely. to minimize risks of damage to property or injury (including death) to persons arising from defects in nec semiconductor products, customers must incorporate sufficient safety measures in their design, such as redundancy, fire-containment, and anti-failure features. nec semiconductor products are classified into the following three quality grades: "standard", "special" and "specific". the "specific" quality grade applies only to semiconductor products developed based on a customer-designated "quality assurance program" for a specific application. the recommended applications of a semiconductor product depend on its quality grade, as indicated below. customers must check the quality grade of each semiconductor product before using it in a particular application. "standard": computers, office equipment, communications equipment, test and measurement equipment, audio and visual equipment, home electronic appliances, machine tools, personal electronic equipment and industrial robots "special": transportation equipment (automobiles, trains, ships, etc.), traffic control systems, anti-disaster systems, anti-crime systems, safety equipment and medical equipment (not specifically designed for life support) "specific": aircraft, aerospace equipment, submersible repeaters, nuclear reactor control systems, life support systems and medical equipment for life support, etc. the quality grade of nec semiconductor products is "standard" unless otherwise expressly specified in nec's data sheets or data books, etc. if customers wish to use nec semiconductor products in applications not intended by nec, they must contact an nec sales representative in advance to determine nec's willingness to support a given application. (note) (1) "nec" as used in this statement means nec corporation and also includes its majority-owned subsidiaries. (2) "nec semiconductor products" means any semiconductor product developed or manufactured by or for nec (as defined above). ? ? ? ? ? ?
user?s manual u14497ej2v0um 4 regional information some information contained in this document may vary from country to country. before using any nec product in your application, piease contact the nec office in your country to obtain a list of authorized representatives and distributors. they will verify: ? device availability ? ordering information ? product release schedule ? availability of related technical literature ? development environment specifications (for example, specifications for third-party tools and components, host computers, power plugs, ac supply voltages, and so forth) ? network requirements in addition, trademarks, registered trademarks, export restrictions, and other legal issues may also vary from country to country. nec electronics inc. (u.s.) santa clara, california tel: 408-588-6000 800-366-9782 fax: 408-588-6130 800-729-9288 nec electronics (germany) gmbh duesseldorf, germany tel: 0211-65 03 02 fax: 0211-65 03 490 nec electronics (uk) ltd. milton keynes, uk tel: 01908-691-133 fax: 01908-670-290 nec electronics italiana s.r.l. milano, italy tel: 02-66 75 41 fax: 02-66 75 42 99 nec electronics (germany) gmbh benelux office eindhoven, the netherlands tel: 040-2445845 fax: 040-2444580 nec electronics (france) s.a. velizy-villacoublay, france tel: 01-30-67 58 00 fax: 01-30-67 58 99 nec electronics (france) s.a. madrid office madrid, spain tel: 91-504-2787 fax: 91-504-2860 nec electronics (germany) gmbh scandinavia office taeby, sweden tel: 08-63 80 820 fax: 08-63 80 388 nec electronics hong kong ltd. hong kong tel: 2886-9318 fax: 2886-9022/9044 nec electronics hong kong ltd. seoul branch seoul, korea tel: 02-528-0303 fax: 02-528-4411 nec electronics singapore pte. ltd. united square, singapore tel: 65-253-8311 fax: 65-250-3583 nec electronics taiwan ltd. taipei, taiwan tel: 02-2719-2377 fax: 02-2719-5951 nec do brasil s.a. electron devices division guarulhos-sp brasil tel: 55-11-6462-6810 fax: 55-11-6462-6829 j00.7
user?s manual u14497ej2v0um 5 major revisions in this edition page description throughout addition of pd77111, 77112, and 77115. p.11 modification of description in 1.2 mpeg-4 celp speech codec p.12 modification of 1.3 product overview p.19 modification of return value, function, and hardware resources in 2.3.2 mpc_initdec function p.20 modification of hardware resources in 2.3.3 mpc_enc function pp.22, 23 modification of function and hardware resources in 2.3.4 mpc_dec function p.25 addition of description to 2.4 compressed data format p.34 modification of appendix sample program source the mark shows major revised points.
user?s manual u14497ej2v0um 6 preface target readers this manual is intended for users who wish to design and develop application systems using the pd77016 family. the pd77016 family includes the pd77015, 77016, 77017, 77018, 77019, 77110, 77111, 77112, 77113, 77114, and 77115. this manual, however, only covers the pd77110, 77111, 77112, 77113, 77114, and 77115. purpose the purpose of this manual is for users to gain an understanding of the middleware used for support when designing and developing application systems using the pd77016 family. organization this manual consists of the following. chapter 1 introduction chapter 2 library specifications chapter 3 installation chapter 4 system example appendix sample program source how to read this manual it is assumed that the reader of this manual has general knowledge in the fields of electrical engineering, logic circuits, and microcontrollers. conventions data significance: higher digits on the left and lower digits on the right note : footnote for item marked with note in the text caution : information requiring particular attention remark : supplementary information number representation: binary or 0b decimal hexadecimal 0x
user?s manual u14497ej2v0um 7 related documents the related documents indicated in this publication may include preliminary versions. however, preliminary versions are not marked as such. documents related to devices user?s manual application note document name part number pamphlet data sheet architecture instructions basic software pd77110 pd77111 pd77112 u12801e pd77113 pd77114 u12395e u14373e u14623e u13116e u11958e pd77115 ? u14867e ??? documents related to development tools document name document no. ie-77016-98, ie-77016-pc user?s manual hardware u13044e ie-77016-cm-lc user?s manual u14139e function u14397e rx77016 user?s manual configuration tool u14404e rx77016 application note host api u14371e caution the related documents listed above are subject to change without notice. be sure to use the latest version of each document for designing.
user?s manual u14497ej2v0um 8 contents chapter 1 introduction............................................................................................................... ................... 11 1.1 middleware ................................................................................................................ ....................................... 11 1.2 mpeg-4 celp speech codec .................................................................................................. ....................... 11 1.3 product overview .......................................................................................................... .................................. 12 1.3.1 features ................................................................................................................ .................................. 12 1.3.2 operating environment ................................................................................................... ......................... 13 1.3.3 performance............................................................................................................. ............................... 13 1.3.4 directory structure ..................................................................................................... .............................. 14 chapter 2 library specifications ........................................................................................... .................. 15 2.1 application processing flow ............................................................................................... ........................... 15 2.2 timing diagrams ........................................................................................................... ................................... 17 2.3 function specifications................................................................................................... ................................ 18 2.3.1 mpc_initenc function .................................................................................................... ........................... 18 2.3.2 mpc_initdec function.................................................................................................... ........................... 19 2.3.3 mpc_enc function........................................................................................................ ............................ 20 2.3.4 mpc_dec function........................................................................................................ ............................ 22 2.3.5 mpc_getversion function ................................................................................................. ....................... 24 2.4 compressed data format .................................................................................................... ........................... 25 2.4.1 header .................................................................................................................. .................................. 25 2.4.2 frame ................................................................................................................... ................................... 27 2.5 relationship between bit rate and number of samples ....................................................................... ...... 28 chapter 3 installation ...................................................................................................... ............................. 30 3.1 installation procedure .................................................................................................... ................................. 30 3.2 sample creation procedure ................................................................................................. ........................... 30 3.3 symbol naming regulations ................................................................................................. ......................... 30 chapter 4 system example ................................................................................................... ........................ 31 4.1 simulation environment in which timing file used .......................................................................... .......... 31 4.2 operation ................................................................................................................. ......................................... 31 appendix sample program source ............................................................................................. .............. 34
user?s manual u14497ej2v0um 9 list of figures figure no. title page 2-1 application processing flow (encoder)..................................................................................... ............................15 2-2 application processing flow (decoder) ..................................................................................... ...........................16 2-3 encoder timing diagram .................................................................................................... ..................................17 2-4 decoder timing diagram .................................................................................................... ..................................17 2-5 header format ............................................................................................................. .........................................25 2-6 frame configuration ....................................................................................................... ......................................27
user?s manual u14497ej2v0um 10 list of tables table no. title page 1-1 supported functions ........................................................................................................ ..................................... 12 1-2 required memory size ...................................................................................................... ................................... 13 1-3 mips values required for compression/decompression processing ............................................................. .... 13 2-1 relationship between narrow band bit rate and number of samples........................................................... ..... 28 2-2 relationship between wide band bit rate and number of samples ............................................................. ...... 29
user?s manual u14497ej2v0um 11 chapter 1 introduction 1.1 middleware middleware is the name given to a group of software that has been tuned so that it draws out the maximum performance of the processor and enables processing that is conventionally performed by hardware to be performed by software. the concept of middleware was introduced with the development of a new high-speed processor, the dsp, in order to facilitate operation of the environments integrated in the system. by providing appropriate speech codec and image data compression/decompression-type middleware, nec is offering users the kind of technology essential in the realization of a multimedia system for the pd77016 family, and is continuing its promotion of system development. the sap77016-b05 is middleware that supplies the functions of speech compression/decompression. 1.2 mpeg-4 celp speech codec the mpeg-4 celp note 1 speech codec is a celp speech compression/decompression function standardized as iso/iec note 2 14496-3 (mpeg-4 version 1) audio part. in addition, the error robustness and silence compression functions are expanded by iso/iec 14496-3/amd1 (mpeg-4 version 2) audio part. this mpeg-4 celp speech codec employs an algorithm proposed by nec. the speech input/output data processed by the mpeg-4 celp speech codec is 16-bit linear pcm data resulting from sampling an analog input signal at 8 or 16 mhz. if the signal is sampled at 8 khz (narrow band: nb), 28 types of bit rates, 3.85 to 12.2 kbps, are supported. if the signal is sampled at 16 khz (wide band: wb), 30 types of bit rates, 10.9 to 23.8 kbps, are supported (refer to 2.5 relationship between bit rate and number of samples). notes 1. celp: code excited linear prediction 2. iso: international organization for standardization iec: international electrotechnical commission
chapter 1 introduction 12 user?s manual u14497ej2v0um 1.3 product overview 1.3.1 features (1) speech input/output data: 16-bit linear pcm data (2) coding/decoding 80 to 320 samples/frame at sampling frequency of 8 or 16 khz (3) 28 types of bit rates (3.85 to 12.2 kbps) at sampling frequency of 8 khz or 30 types of bit rates (10.9 to 23.8 kbps) at 16 khz (4) high-quality speech coding ? wide band (16 khz sampling) ? quality equivalent to itu-t g.729 note at 8 kbps and sampling frequency of 8 khz note international telecommunication union ? telecommunication standardization sector table 1-1 lists the supported functions. table 1-1. supported functions function encoder decoder basic coding function (base layer) ? bit rate hierarchy function (bit rate scalable) band hierarchy function (band width scalable) multi-pulse sound source (multi pulse excitation) ? regular pulse sound source (regular pulse excitation) fine rate control version 1 version 1 compressed data format ? error concealment note : bit error ? error concealment note : frame erasure ? silence compression version 2 version 2 compressed data format note error concealment is a function of version 2, but this middleware allows it to be used with data of version 1. caution ?version? in the above figure indicates the version of mpeg-4, not the version of the middleware. remark : supported, : not supported, ? : not subject to support
chapter 1 introduction user?s manual u14497ej2v0um 13 1.3.2 operating environment (1) target dsp: pd77110, 77111 note , 77112 note , 77113, 77114, 77115 note note applicable when these processors operate only as decoders. (2) required memory size: this middleware can be used as a codec, or separately as an encoder or decoder. table 1-2 shows the required memory size. table 1-2. required memory size memory type size (words) encoder [words] decoder [words] instruction memory ? 14.6 k 8.0 k 8.0 k ram (work) (static) encoder: 3 k / decoder: 1.5 k 3.2 k 3.0 k 2.7 k 1.5 k 0.6 k x memory rom 5.5 k 2.4 k 5.0 k ram (work) (static) encoder: 4.7 k / decoder: 0.7 k 2.5 k 4.7 k 2.5 k 0.7 k 0.1 k y memory rom 13.1 k 10.1 k 9.3 k (3) software tools (windows tm version): dsp tools ? wb77016 (workbench assembler) ? hsm77016 (high-speed simulator) ? ie77016 (debugger) 1.3.3 performance [condition] dsp: pd77016 family (33 mips @ 33 mhz operation) [the mips values required to execute the processing of 1 frame in real time] table 1-3. mips values required for compression/decompression processing bit rate [bps] compression time [mips] decompression time (postprocessing filter on) [mips] total (postprocessing filter on) [mips] 4650 (nb) 16.5 2.5 19.0 5500 (nb) 17.5 2.6 20.1 7300 (nb) 19.5 2.6 22.1 10700 (nb) 20.8 3.3 24.1 12200 (nb) 22.3 3.5 25.8 14300 (nb) 52.5 9.1 61.6 17000 (nb) 55.3 9.3 64.6 21100 (nb) 58.2 12.3 70.5 23800 (nb) 60.8 12.5 73.3
chapter 1 introduction 14 user?s manual u14497ej2v0um 1.3.4 directory structure the contents of the packages are shown below. mpc_110b.lib: library for the pd77110 and 77115 (be mode) mpc_110f.lib: library for the pd77110 and 77115 (fe mode) mpc_11xb.lib: library for the pd77111, 77112, 77113, and 77114 (be mode) mpc_11xf.lib: library for the pd77111, 77112, 77113, and 77114 (fe mode) ? mpc_enc.h: header file for encoder mpc_dec.h: header file for decoder sample.prj: sample project file sample.asm: sample source file sample.tmg: sample timing file input.dat: input data for sample program out.dat: expected output data for sample program readme.txt: explanation of each file each directory is outlined below. (1) library stores the library files. two types of libraries, for be (bit error) mode and fe (frame erasure) mode, are available depending on the differences in the concealment processing of the decoder, and either of them is selected when the middleware is embedded into a system. they cannot be selected during reception. ? be (bit error) mode this mode is used if the system can receive error frame information. the past frame data and part of the current frame data are used for decoding processing in this mode. ? fe (frame erasure) mode this mode is used if the system can receive no error frame information. in this mode, decoding processing is performed by using only the past frame data. (2) -- stores the source files of the sample program, and the header files. a timing file, to be described later, is also available.
user?s manual u14497ej2v0um 15 chapter 2 library specifications mpeg-4 celp provides the following 5 functions. function name function mpc_initenc encode processing initialization mpc_initdec decode processing initialization mpc_enc encode processing mpc_dec decode processing mpc_getversion version information acquisition 2.1 application processing flow examples of application processing using the mpeg-4 celp speech codec are shown in figures 2-1 and 2-2 below. figure 2-1. application processing flow (encoder) start speech i/o initialization processing ? ad/da initial settings ? interrupt enable, etc. encoder initialization call mpc_initenc : bit rate and sampling frequency settings, header output speech input interrupt handler 16-bit linear data input sampling of 1 frame complete? encode data input processing encode processing call mpc_enc encode data output processing no ye s
chapter 2 library specifications 16 user?s manual u14497ej2v0um figure 2-2. application processing flow (decoder) start speech i/o initialization processing ad/da initial settings ? interrupt enable, etc. ? decoder initialization call mpc_initdec : header analysis speech output interrupt handler decode data input processing 16-bit linear data output sampling of 1 frame complete? decode processing call mpc_dec decode data output processing no ye s the speech data i/o processing is dependent on the target system?s hardware, so make sure the design accords with the target system.
chapter 2 library specifications user?s manual u14497ej2v0um 17 2.2 timing diagrams figure 2-3. encoder timing diagram 0 speech input interrupt handler user application mpeg-4 celp encode processing <3> <1> <4> <2> time 1 frame of speech 1 frame of compressed data 1 frame of speech data <1> sampling frequency: 8 or 16 khz, precision: 16 bits; a/d converted to 1 frame of pcm data <2> buffering via the user application <3> 1 frame of sample data is compressed <4> 1 frame of compressed data is saved. the user can use the rest of the time for processing another application. figure 2-4. decoder timing diagram 0 speech output interrupt handler user application mpeg-4 celp decode processing <2> <4> <3> <1> time 1 frame of speech 1 frame of compressed data 1 frame of speech data <1> 1 frame of compressed data is read and passed to decompression processing <2> 1 frame of compressed data is decompressed into 1 frame of sample data
chapter 2 library specifications 18 user?s manual u14497ej2v0um <3> the decompressed speech data is buffered. the user can use the rest of the time for processing another application. <4> sampling frequency: 8 or 16 khz, precision: 16 bits; 1 frame of pcm data is d/a converted 2.3 function specifications 2.3.1 mpc_initenc function ? classification mpeg-4 celp encoder initialization processing ? function name mpc_initenc ? summary of function makes the parameter settings and initializes the ram area used by the mpeg-4 celp encoder. ? format call mpc_initenc ? arguments *mpc_e_ana_buff_sadr:x output data buffer start address (x memory) *mpc_e_rate_num:x bit rate setting. sets the 28 types/30 types of bit rates in the no. column in the tables in 2.5 relationship between bit rate and number of samples . sets the mpe configuration of the header. *mpc_e_wb:x sets the sampling frequency. 0: nb/1: wb set in the sample rate mode of the header. r6 start address of the x memory work area r5 start address of the y memory work area ? return value *mpc_e_pcm_num:x number of samples per frame *mpc_e_ana_bits:x number of compressed data bits in 1 frame ? function makes the parameter settings necessary for the mpeg-4 celp encoder, initializes the calculation area, and outputs the header to the top of the buffer specified by mpc_e_ana_buff_sadr. (11 bits with msb first). the bit rate cannot be changed after the initialization processing. for details of the memory size required for the work area, refer to the value of the ram (work) in 1.3.2 (2) required memory size . the encoded data can be output in version 1 only. it cannot be output in version 2. ? registers used r0, r1, r2, r3, r4, r5, r6, r7, dp0, dp1, dp2, dp3, dp4, dp5, dn0, dn1 ? hardware resources the hardware resources for this function are as follows. maximum stack level: 3 maximum loop stack level: 1 maximum number of repeats: 800 maximum number of cycles: 2700
chapter 2 library specifications user?s manual u14497ej2v0um 19 caution between when the mpc_initenc function was called and the end of compression processing, the ram area must not be destroyed. if the ram area is destroyed, operation is not guaranteed. 2.3.2 mpc_initdec function ? classification mpeg-4 celp decoder initialization processing ? function name mpc_initdec ? summary of function makes the parameter settings and initializes the ram area used by the mpeg-4 celp decoder. ? format call mpc_initdec ? arguments *mpc_d_ana_buff_sadr:x input data buffer start address (x memory) *mpc_d_pf_flag:x post-processing filter flag. 0: off/1: on r6 work area x memory start address r5 work area y memory start address ? return value *mpc_d_pcm_num:x number of samples per frame *mpc_d_ana_bits:x number of celpbaseframe bits among compressed data in 1 frame (this is the same as the number of compressed bits in 1 frame if silence compression is not used.) ? function analyses the compressed data by the header, sets the parameters required for the mpeg-4 celp decoder, and initializes the calculation area. the header is input to the top of the buffer specified by mpc_d_ana_buff_sadr. (11 bits with msb first in version 1, and 12 bits with msb first in version 2). whether the speech data output is passed through a post-processing filter is determined by mpc_d_pf_flag. the post-processing filter is a filter configured on the output side of the decoder to improve the sound quality of the decoded speech signals. refer to 2.4.1 header for the format of the header. for details of the memory size required for the work area, refer to the value of the ram (work) in 1.3.2 operating environment . ? registers used r0, r1, r2, r3, r4, r5, r6, r7, dp0, dp1, dp2, dp4, dp5, dn0 ? hardware resources the hardware resources for this function are as follows. maximum stack level: 3 maximum loop stack level: 1 maximum number of repeats: 50 maximum number of cycles: 800
chapter 2 library specifications 20 user?s manual u14497ej2v0um caution between when the mpc_initdec function was called and the end of decompression processing, the ram area must not be destroyed. if the ram area is destroyed, operation is not guaranteed. 2.3.3 mpc_enc function ? classification mpeg-4 celp encoder processing ? function name mpc_enc ? summary of function compresses 1 frame of specified speech data. ? format call mpc_enc ? arguments *mpc_e_pcm_buff_sadr:x input data buffer start address (x memory) *mpc_e_ana_buff_sadr:x output data buffer start address (x memory) ? return value none ? function performs compression processing for speech data specified by mpc_e_pcm_buff_sadr and writes and returns this data to the compressed data buffer specified by mpc_e_ana_buff_sadr. if the final word of the compressed data frame is less than 1 word, this data is word-aligned by outputting it after filling the remainder with 0s. the number of samples input in 1 frame is determined by the bit rate, and is assigned by mpc_e_pcm_num, which is the return value of the encoder initialization processing, mpc_initenc. the size of the compressed data output is also determined by the bit rate. neither the bit rate nor nb/wb can be changed. the compressed data is a stream of bit units. input data (speech data) 1 frame of speech data the number of samples (mpc_e_pcm_num) is determined at initialization. 16-bit pcm mpc_e_pcm_buff_sadr 16-bit pcm 16-bit pcm
chapter 2 library specifications user?s manual u14497ej2v0um 21 output data (compressed data) 1 frame of compressed data the number of compressed data bits (mpc_e_ana_bits) is determined at initialization. compressed data mpc_e_ana_buff_sadr compressed data compressed data partial data output during processing zero data valid data ? registers used r0, r1, r2, r3, r4, r5, r6, r7, dp0, dp1, dp2, dp3, dp4, dp5, dp6, dp7, dn0, dn1, dn2, dn3, dn4, dn5, dn6, dn7, dmx, dmy ? hardware resources the hardware resources for this function are as follows. maximum stack level: 6 maximum loop stack level: 4 maximum number of repeats: 340 maximum mips value: 60.8
chapter 2 library specifications 22 user?s manual u14497ej2v0um 2.3.4 mpc_dec function ? classification mpeg-4 celp decoder processing ? function name mpc_dec ? summary of function decompresses 1 frame of the specified compressed speech data. ? format call mpc_dec ? arguments *mpc_d_ana_buff_sadr:x input data buffer start address (x memory) *mpc_d_pcm_buff_sadr:x output data buffer start address (x memory) *mpc_d_err_flag:x recover processing flag. 0: off/1: on ? return value none s ? function performs decompression processing for compressed data specified by mpc_d_ana_buff_sadr and writes and returns this data to the speech data buffer specified by mpc_d_pcm_buff_sadr. when the mpc_d_err_flag is on, that frame is regarded to have an error, and recovery is performed by error concealment processing using the data of the previous frame. a frame error must be detected by the calling system. recovery processing is performed in two modes, be (bit error) mode and fe (frame erasure) mode, and is determined depending on the library to be embedded (refer to 1.2 mpeg-4 celp speech codec and 1.3.4 directory structure ). if the final word of the compressed data frame is less than 1 word, the valid data is input starting from the msb. the size of the compressed data input and the number of samples output in 1 frame is determined by the bit rate. the bit rate cannot be changed. if silence compression is used, the size of the compressed data input varies depending upon the frame. the compressed data is a stream of bit units. input data (compressed data) 1 frame of compressed data (word boundary) the number of compressed data bits (mpc_d_ana_bits) is determined at initialization. compressed data mpc_d_ana_buff_sadr compressed data partial data input during processing no care valid data
chapter 2 library specifications user?s manual u14497ej2v0um 23 output data (speech data) 1 frame of speech data the number of samples (mpc_d_pcm_num) is determined at initialization. 16-bit pcm 16-bit pcm mpc_d_pcm_buff_sadr ? registers used r0, r1, r2, r3, r4, r5, r6, r7, dp0, dp1, dp2, dp3 dp4, dp5, dp6, dp7 dn0, dn1, dn2, dn3, dn4, dn5, dn6, dn7, dmx, dmy ? hardware resources the hardware resources for this function are as follows. maximum stack level: 7 maximum loop stack level: 3 maximum number of repeats: 400 maximum mips value: 12.5 (with no error code)
chapter 2 library specifications 24 user?s manual u14497ej2v0um 2.3.5 mpc_getversion function ? classification version information acquisition ? function name mpc_getversion ? summary of function returns the version of the library. ? format call mpc_getversion ? arguments none ? return value r0h major version number r0l minor version number ? function returns the version number of the mpeg-4 celp speech codec library as a 32-bit value. when r0 = 0x00?0x0001?0x0100: version: v1.01 ? registers used r0 ? hardware resources the hardware resources for this function are as follows. maximum stack level: 1 maximum loop stack level: 0 maximum number of repeats: 0 maximum number of cycles: 6
chapter 2 library specifications user?s manual u14497ej2v0um 25 2.4 compressed data format the mpeg-4 celp speech codec has two types of compressed data formats: version 1 and version 2. with this middleware, the encoder outputs compressed data of version 1. the decoder can read compressed data of both versions 1 and 2. version 1: conforms to mpeg-4 celp object version 2: conforms to mpeg-4 er-celp object 2.4.1 header with version 1, the header size is 11 bits (bws = off) or 13 bits (bws = on), and the header configuration is as shown in figure 2-5 (a). with version 2, the header size is 12 bits (bws = off) or 14 bits (bws = on), and the header configuration is as shown in figure 2-5 (b). figure 2-5. header format (a) version 1 5 bits 2 bits 1 bit 1 bit 1 bit reserved mpe configuration enhancement layer number bws mode 1 bit reserved sample rate mode bws configuration (bws mode = 1) 2 bits
chapter 2 library specifications 26 user?s manual u14497ej2v0um (b) version 2 (1) sample rate mode: determines the sampling frequency of mpeg-4 celp. 8 khz (narrow band): 0, 16 khz (wide band): 1 (2) silence compression (provided in version 2 only): specifies silence compression. off: 0, on: 1 (3) mpe configuration: determines the compression bit rate of mpeg-4 celp. (28 types/30 types) (4) number of enhancement layers: not supported in this middleware (always 0). (5) bws mode: not supported in this middleware (always 0). (6) bws configuration: not supported in this middleware (this bit does not exist). 5 bits 2 bits 1 bit 1 bit 1 bit reserved mpe configuration enhancement layer number bws mode 1 bit reserved sample rate mode bws configuration (bws mode = 1) 2 bits 1 bit silence compression
chapter 2 library specifications user?s manual u14497ej2v0um 27 2.4.2 frame figure 2-6. frame configuration (a) with version 1 or version 2 when silence compression = off (b) with version 2 when silence compression = on note the bit length of the celpbaseframe differs depending upon the bit rate and can be calculated by the following expression (refer to 2.5 relationship between bit rate and number of samples ): ? for narrow band compressed bit rate (x) number of samples per frame (l) 8000 ? for wide band compressed bit rate (x) number of samples per frame (l) 16000 the bit length can be obtained by the return value ?mpc_e_ana_bits:x? of the mpc_initenc function or the return value ?mpc_d_ana_bits:x? of the mpc_initdec function. celpbaseframe note celpbaseframe note if tx_flag = 1 (the first bit is 0 and second bit is 1) lpc if tx_flag = 2 (the first bit is 1 and second bit is 0) rms 15bits (nb) or 32 bits (wb) 6 bits if tx_flag = 3 (the first bit is 1 and second bit is 1) rms 6 bits if tx_flag = 0 (the first bit is 0 and second bit is 0) 0 bit tx_flag 2 bits tx_flag 2 bits tx_flag 2 bits tx_flag 2 bits
chapter 2 library specifications 28 user?s manual u14497ej2v0um 2.5 relationship between bit rate and number of samples the relationship between the number of samples and the 28 types of compression bit rates for the narrow band (8 khz sampling) and 30 types of compression bit rates for the wide band (16 khz sampling) is shown in the tables below. table 2-1. relationship between narrow band bit rate and number of samples no. compression bit rate (bps): x number of samples per frame: l 0 3850 320 1 4250 320 2 4650 320 3 4900 240 4 5200 240 5 5500 240 6 5700 160 7 6000 160 8 6300 160 9 6600 160 10 6900 160 11 7100 160 12 7300 160 13 7700 160 14 8300 160 15 8700 160 16 9100 160 17 9500 160 18 9900 160 19 10300 160 20 10500 160 21 10700 160 22 11000 80 23 11400 80 24 11800 80 25 12000 80 26 12200 80 27 6200 240
chapter 2 library specifications user?s manual u14497ej2v0um 29 table 2-2. relationship between wide band bit rate and number of samples no. compression bit rate (bps): x number of samples per frame: l 0 10900 320 1 11500 320 2 12100 320 3 12700 320 4 13300 320 5 13900 320 6 14300 320 7 reserve ? 8 14700 320 9 15900 320 10 17100 320 11 17900 320 12 18700 320 13 19500 320 14 20300 320 15 21100 320 16 13600 160 17 14200 160 18 14800 160 19 15400 160 20 16000 160 21 16600 160 22 17000 160 23 reserve ? 24 17400 160 25 18600 160 26 19800 160 27 20600 160 28 21400 160 29 22200 160 30 23000 160 31 23800 160
30 user?s manual u14497ej2v0um chapter 3 installation 3.1 installation procedure the mpeg-4 celp speech codec middleware is supplied on a 3.5-inch floppy disk (1.44 mb). the procedure for installing the sap77016-b05 in the host machine is outlined below. (1) set the floppy disk in the floppy disk drive and copy the files to the directory where tools from atair are used (e.g. c:\dsptools). the following is an example of when files are copied from the a drive to the c drive. (2) confirm that the files have been copied. refer to 1.3.4 directory structure for details on the directories. 3.2 sample creation procedure the sample program is stored in the sample directory of the supplied medium. with the sample program, it is possible to simulate the external i/o of speech and compressed data by using a timing file to be described later (in chapter 4 system example ) on the sm77016 atair simulator. the following is an explanation of how to build the mpeg-4 celp speech codec middleware sample program. (1) start up the wb77016 (workbench). (2) open the sample.prj project. example specify sample.prj from open project on the project menu. (3) execute build and confirm that sample.lnk has been created. example the sample.lnk file is generated by selecting build all from the make menu. (4) start up the sm77016 (simulator) (5) open sample.lnk example specify sample.lnk by clicking open on the file menu. (6) open the timing file sample.tmg. example specify sample.tmg by clicking open on the file menu. 3.3 symbol naming regulations the section names used in this library are shown below. classification regulation function name, variable name mpc_xxxx macro, constant name mpc_xxxx section name __mpc_xxxx (two underscores at the start) a:\>xcopy /s *.* c:\dsptools a:\>dir c:\dsptools
user?s manual u14497ej2v0um 31 chapter 4 system example 4.1 simulation environment in which timing file used an example in which the speech codec compression/decompression processing simulator and a timing file are used is shown below. speech data is input, and then output frame by frame after each frame has undergone compression/decompression processing. software environment: ? high-speed simulator: hsm77016 ? sample program: sample.lnk (created in 3.2 sample creation procedure ) ? timing file: sample.tmg 4.2 operation (1) start up the hsm77016 (high-speed simulator) (2) open sample.lnk, which was created in 3.2 sample creation procedure . example specify sample.lnk by clicking open on the file menu. (3) open the timing file sample.tmg. example specify sample.tmg by clicking open on the file menu. (4) make the wait settings. example set waits in the dwtr/iwtr registers in the setting windows opened by clicking periphery register on the window menu. (5) execute with run. the timing file sample.tmg is described below. the high-speed simulator (hsm77016) provides a function for simulating external i/o using a timing file. (a) data file input (16-bit data) data is input from a file via the host interface. an example of the description format is shown below. ? preparation open input ?input.dat? ; input file specification (encode data) input format hex ; input file format specification ? input processing (16-bit data) wait cond pin hwe == 0 ; waiting until the host can write to hdt(in). wait cond pin hcs == 1 ; waiting until the chip select signal becomes inactive. set pin hcs = 0 ; input starts when the chip select signal becomes active. ; (a) set port ha = 0 ; the lower 8 bits of the hdt register are selected. set pin hwr = 0 ; the host write strobe is activated. input data ; data values are input from the data file and are assigned as ?data?. set port hd = data&0xff ; the 8-bit ?data? is input from the hd port. wait 100ns ; waiting until the data is transferred.
chapter 4 system example 32 user?s manual u14497ej2v0um set pin hwr = 1 ; input ends when hwr becomes inactive. wait 5ns ; delay ; (b) ;the processing from (a) to (b) is repeated for higher 8 bits. set port ha = 1 ; the higher 8 bits of the hdt register are selected. wait 5ns ; delay set pin hwr = 0 ; start output set port hd = (data>>8)&0xff ; input high byte to host port wait 100ns ; access duration set pin hwr = 1 ; end input set pin hcs = 1 ; input ends when the chip select signal becomes inactive. ? termination close input ; the data file is closed. (b) data file output (16-bit data) ? preparation open output ?out.dat? ; output file specification (encode data) output format hidebase unsigned hex ; output file format specification ? output processing (16-bit data) wait cond pin hre == 0 ; waiting until the host can read from hdt(out). wait cond pin hcs == 1 ; waiting until the chip select signal becomes inactive. set pin hcs = 0 ; output starts when the chip select signal becomes active. ; (a) set port ha = 0 ; the lower 8 bits of the hdt register are selected. set pin hrd = 0 ; the host read strobe is activated. wait 50ns ; access duration set lowbyte = port hd&0xff ; 8 bits are read out from the hd port and are assigned as ?lowbyte?. set pin hrd = 1 ; output ends when hrd becomes inactive. wait 5ns ; delay ; (b) ;the processing from (a) to (b) is repeated for higher 8 bits. set port ha = 1 ; the higher 8 bits of the hdt register are selected. wait 5ns ; delay set pin hrd = 0 ; start output wait 50ns ; access duration output ((port hd&0xff)<<8)|lowbyte; output word data to file set pin hrd = 1 ; end output set pin hcs = 1 ; output ends when the chip select signal becomes inactive.
chapter 4 system example user?s manual u14497ej2v0um 33 ? termination close input ; the data file is closed.
34 user?s manual u14497ej2v0um appendix sample program source /*----------------------------------------------------------------------*/ /* file information */ /*----------------------------------------------------------------------*/ /* name : sample.asm for timing file */ /* type : spx assembler code */ /* version : 2.00a */ /* date : 2000.06.21 */ /* cpu : upd7701x */ /* compiler: atair upd77016 workbench */ /* about : encoder function module */ /*----------------------------------------------------------------------*/ /* copyright (c) nec corporation 1998,1999 */ /* nec confidential and proprietary */ /* all rights reserved by nec corporation. */ /* use of copyright notice does not evidence publication */ /*----------------------------------------------------------------------*/ #include "mpc_enc.h" #include "mpc_dec.h" #define stack_size_e 0x1500 #define stack_size_d 0x700 #define hst 0x3807 #define hdt 0x3806 #define hdo 0x3806 #define start_address 0x200 #define vectr_address 0x210 #define begin_address 0x240 #define wb_flag 1 /* 0:nb / 1:wb */ #define rate_number 6 /* bit rate number */ #define frame_size 320 /* pcm frame size */ #define postfilter_flag 1 /* postfilter 0:off/1:on */ #define version 1 /* bitstream version */ %define(_read_host(reg)) ( r0l=*hst:x; r0=r0 & 0x1; if(r0 != 0) jmp $-2; r@reg = *hdt:x; ) %define(_write_host(reg)) ( r0l=*hst:x; r0=r0 & 0x2; if(r0 != 0) jmp $-2; *hdt:x=r@reg; ) %define(_vector_def)
appendix sample program source user?s manual u14497ej2v0um 35 ( nop; reti; nop; nop; ) /*----------------------------------------------------------------------*/ user_data xramseg inputdata: ds 320; codedata: ds 30; outputdata: ds 320; user_free_x xramseg _user_free_x_area_d: ds stack_size_d; _user_free_x_area_e: ds stack_size_e; user_free_y yramseg _user_free_y_area_d: ds stack_size_d; _user_free_y_area_e: ds stack_size_e; /*----------------------------------------------------------------------*/ /* function name : main */ /*----------------------------------------------------------------------*/ /* others: r_ [*, , , , , , ,*] dmx,dmy [ , ] */ /* dp_ [*, , , , , , , ] loops/stacks [1/0] */ /* dn_ [ , , , , , , , ] cycles ??? */ /*----------------------------------------------------------------------*/ startup imseg at start_address jmp _main; vector imseg at vectr_address ;0x210 int1 %_vector_def; ;0x214 int2 %_vector_def; ;0x218 int3 %_vector_def; ;0x21c int4 %_vector_def; ;0x220 serial input 1 %_vector_def; ;0x224 serial output 1 %_vector_def; ;0x228 serial input 2 %_vector_def;
appendix sample program source user?s manual u14497ej2v0um 36 ;0x22c serial output 2 %_vector_def; ;0x230 host input %_vector_def; ;0x234 host output %_vector_def; main imseg at begin_address _main: clr(r0); call _init_int; /* initialize interrupt */ /* ------------- */ /* clear memory */ /* ------------- */ clr(r0); clr(r1); clr(r2); r0l=_user_free_x_area_e; r1l=_user_free_y_area_e; r2l=stack_size_e; call _zero_mem; clr(r0); clr(r1); clr(r2); r0l=_user_free_x_area_d; r1l=_user_free_y_area_d; r2l=stack_size_d; call _zero_mem; /* -------------------- */ /* -------------------- */ /* -------------------- */ /* setting for encoder */ /* -------------------- */ r7l = codedata; *mpc_e_ana_buff_sadr:x = r7l; r7l = rate_number; *mpc_e_rate_num:x = r7l; r7l=wb_flag; *mpc_e_wb:x=r7l; clr(r6); clr(r5); r6l=_user_free_x_area_e; r5l=_user_free_y_area_e; call mpc_initenc; /* for encoder function */ /* -------------------- */ /* setting for decoder */ /* -------------------- */ r7l= codedata; *mpc_d_ana_buff_sadr:x = r7l; r7l = postfilter_flag; *mpc_d_pf_flag:x=r7l; r7l = version;
appendix sample program source user?s manual u14497ej2v0um 37 *mpc_d_ver:x=r7l; clr(r6); clr(r5); r6l=_user_free_x_area_d; r5l=_user_free_y_area_d; call mpc_initdec; /* -------------------- */ /* begin main loop */ /* -------------------- */ _main_loop: /* -------------------- */ /* read input data */ /* -------------------- */ r0l=inputdata; call _read_code_data; /* -------------------- */ /* encode one frame */ /* -------------------- */ r7l = inputdata; *mpc_e_pcm_buff_sadr:x = r7l; call mpc_enc; /* -------------------- */ /* decode one frame */ /* -------------------- */ r7l = outputdata; *mpc_d_pcm_buff_sadr:x = r7l; clr(r0); *mpc_d_err_flag:x = r0l; call mpc_dec; /* -------------------- */ /* write output data */ /* -------------------- */ r0l=outputdata; r1l=*mpc_d_pcm_num:x; call _write_code_data; jmp _main_loop; /*----------------------------------------------------------------------*/ /* function name : _init_int */ /* disable internal interrupt ho,hi */ /*----------------------------------------------------------------------*/ /* others: r_ [*, , , , , , , ] dmx,dmy [ , ] */ /* dp_ [ , , , , , , , ] loops/stacks [0/0] */ /* dn_ [ , , , , , , , ] cycles ??? */ /*----------------------------------------------------------------------*/ _init_int: r0l=sr; r0=r0 | 0x0300; sr=r0l; r0l=0x0001; *hst:x=r0l;
appendix sample program source user?s manual u14497ej2v0um 38 ret; /*----------------------------------------------------------------------*/ /* function name : _write_code_data */ /* [argv] */ /* r0l:write data ponter : xmem */ /* r1l:number of write data */ /*----------------------------------------------------------------------*/ /* others: r_ [*,*, , , , , ,*] dmx,dmy [ , ] */ /* dp_ [*, , , , , , , ] loops/stacks [1/0] */ /* dn_ [ , , , , , , , ] cycles ??? */ /*----------------------------------------------------------------------*/ _write_code_data: dp0=r0l; if(r1 == 0) jmp _end_write_code_data; r7l=*dp0++; loop r1l{ %_write_host(7l); r7l=*dp0++; nop; }; _end_write_code_data: r0l=*hst:x; r0=r0 & 0x2; if(r0 != 0) jmp $-2; ret; /*----------------------------------------------------------------------*/ /* function name : _read_code_data */ /* [argv] */ /* r0l:read data ponter : xmem */ /* [ret] */ /*----------------------------------------------------------------------*/ /* others: r_ [*, , , , , , , ] dmx,dmy [ , ] */ /* dp_ [*, , , , , , , ] loops/stacks [1/0] */ /* dn_ [ , , , , , , , ] cycles ??? */ /*----------------------------------------------------------------------*/ _read_code_data: dp0=r0l; r0l=frame_size; loop r0l{ %_read_host(0); *dp0++=r0h; nop; }; ret; /*----------------------------------------------------------------------*/ /* function name : _zero_mem */ /* clear memory */ /* [argv] */ /* r0l:start address : xmem */ /* r1l:start address : ymem */ /* r2l:size */ /* [ret] */ /* r0:0 :error !=0:ok */
appendix sample program source user?s manual u14497ej2v0um 39 /*----------------------------------------------------------------------*/ /* others: r_ [*,*, , , , , , ] dmx,dmy [ , ] */ /* dp_ [*, , , ,*, , , ] loops/stacks [1/0] */ /* dn_ [ , , , , , , , ] cycles ??? */ /*----------------------------------------------------------------------*/ _zero_mem: dp0=r0l; dp4=r1l; clr(r1); clr(r0); rep r2l; *dp0++=r0l *dp4++=r1l; ret; end
although nec has taken all possible steps to ensure that the documentation supplied to our customers is complete, bug free and up-to-date, we readily accept that errors may occur. despite all the care and precautions we've taken, you may encounter problems in the documentation. please complete this form whenever you'd like to report errors or suggest improvements to us. hong kong, philippines, oceania nec electronics hong kong ltd. fax: +852-2886-9022/9044 korea nec electronics hong kong ltd. seoul branch fax: 02-528-4411 taiwan nec electronics taiwan ltd. fax: 02-2719-5951 address north america nec electronics inc. corporate communications dept. fax: 1-800-729-9288 1-408-588-6130 europe nec electronics (europe) gmbh technical documentation dept. fax: +49-211-6503-274 south america nec do brasil s.a. fax: +55-11-6462-6829 asian nations except philippines nec electronics singapore pte. ltd. fax: +65-250-3583 japan nec semiconductor technical hotline fax: 044-435-9608 i would like to report the following error/make the following suggestion: document title: document number: page number: thank you for your kind support. if possible, please fax the referenced page or drawing. excellent good acceptable poor document rating clarity technical accuracy organization cs 00.6 name company from: tel. fax facsimile message


▲Up To Search▲   

 
Price & Availability of USAB13AP77016-XXX-B05

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X